@(message: String)(implicit session:Session)

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MobileMenu</title>
    <script type="module" src='@routes.Assets.versioned("ionic/core/dist/ionic/ionic.esm.js")'></script>
    <script nomodule src='@routes.Assets.versioned("ionic/core/dist/ionic/ionic.js")'></script>
    <link rel="stylesheet" href='@routes.Assets.versioned("ionic/core/css/ionic.bundle.css")' />
    <style>
    :root {
      --ion-safe-area-top: 20px;
      --ion-safe-area-bottom: 22px;
    }
  </style>
    <script type="module">
    import { modalController } from '@routes.Assets.versioned("ionic/core/dist/ionic/index.esm.js")';
    window.modalController = modalController;
  </script>
    <link rel="stylesheet" media="screen" href='@routes.Assets.versioned("css/main.css")'>
    <link rel="shortcut icon" type="image/png" href='@routes.Assets.versioned("images/favicon.png")'>
    <meta name="wpk-bid" content="dta_1_241931328">
    <script>
        !(function(c,i,e,b){var h=i.createElement("script");
        var f=i.getElementsByTagName("script")[0];
        h.type="text/javascript";
        h.crossorigin=true;
        h.onload=function(){c[b]||(c[b]=new c.wpkReporter({bid:"dta_1_241931328"}));
        c[b].installAll()};
        f.parentNode.insertBefore(h,f);
        h.src=e})(window,document,"https://g.alicdn.com/woodpeckerx/jssdk??wpkReporter.js","__wpk");
    </script>
</head>
@if(session.get("accid").isEmpty){<body ng-app="todo" class="layui-layout-body" accesskey="nologin" >}else{<body ng-app="todo" class="layui-layout-body" accesskey='@session.get("sign")'>}
<ion-app>
    <!-- 左侧菜单 -->
    <ion-menu side="start" content-id="main-content">
        <ion-header>
            <ion-toolbar translucent>
                <ion-title>Menu</ion-title>
            </ion-toolbar>
        </ion-header>
        <ion-content>
            <ion-list>
                <ion-item>
                    <ion-icon name="paper-plane" slot="start"></ion-icon>
                    <ion-label><a href="@routes.HomeController.index()">首页</a></ion-label>
                </ion-item>
                <ion-item>
                    <ion-icon name="paper-plane" slot="start"></ion-icon>
                    <ion-label><a href="@controllers.admin.routes.WiFiController.index()">WiFi服务</a></ion-label>
                </ion-item>
                <ion-item>
                    <ion-icon name="heart" slot="start"></ion-icon>
                    <ion-label>Favorites</ion-label>
                </ion-item>
                <ion-item>
                    <ion-icon name="archive" slot="start"></ion-icon>
                    <ion-label>Archived</ion-label>
                </ion-item>
                <ion-item>
                    <ion-icon name="trash" slot="start"></ion-icon>
                    <ion-label>Trash</ion-label>
                </ion-item>
                <ion-item>
                    <ion-icon name="warning" slot="start"></ion-icon>
                    <ion-label>Spam</ion-label>
                </ion-item>
            </ion-list>
        </ion-content>
    </ion-menu>
    <!-- 中心内容 -->
    <div class="ion-page" id="main-content">
<ion-header>
    <ion-toolbar>
        <ion-buttons slot="start">
            <ion-menu-button></ion-menu-button>
        </ion-buttons>
        <ion-title>手机个人中心（<span id="username">@session.get("uname")</span>）</ion-title>
    </ion-toolbar>
</ion-header>
<ion-content class="ion-padding">

    <ion-button expand="block">Show Modal</ion-button>


    <p id="testvalue">ionic 移动应用。</p>
    @if(session.get("accid").nonEmpty){<!-- if user.is_authenticated -->
    <a href="javascript:;">
        @session.get("uname")
    </a>
    <dl class="">
        <dd><a href="javascript:;">@session.get("admin")</a></dd>
        <dd><a href="javascript:;">安全管理</a></dd>
        <!-- if user.is_superuser -->

        <!-- endif -->
        <dd><a class="lay-btn" data-method="mpassword" data-type="auto" >修改密码</a></dd>

    </dl>
    }else{<!-- else -->

    <a data-method="loginnotice" data-type="auto" class="lay-btn">测试</a>

    }

</ion-content>
<ion-content  class="ion-padding">
   目前仅开通PC端正常使用，请在电脑端钉钉中打开本应用。
</ion-content>

    </div>
    <!---  header start -->

</ion-app>
<script type="text/javascript" src="@routes.HomeController.javascriptRoutes()"></script>
<script src="//g.alicdn.com/dingding/dingtalk-jsapi/2.0.57/dingtalk.open.js"></script>

<script src='@routes.Assets.versioned("js/dingtalk_mobile.js")' type="text/javascript"></script>
<script>
//JavaScript代码区域

</script>
<script>
customElements.define('modal-content', class ModalContent extends HTMLElement {
connectedCallback() {
this.innerHTML = `
<ion-header translucent>
    <ion-toolbar>
        <ion-title>Modal Content</ion-title>
        <ion-buttons slot="end">
            <ion-button onclick="dismissModal()">Close</ion-button>
        </ion-buttons>
    </ion-toolbar>
</ion-header>
<ion-content fullscreen>
    <ion-list>
        <ion-item>
            <ion-avatar slot="start">
                <ion-img src="./avatar-gollum.jpg"/>
            </ion-avatar>
            <ion-label>
                <h2>Gollum</h2>
                <p>Sneaky little hobbitses!</p>
            </ion-label>
        </ion-item>
        <ion-item>
            <ion-avatar slot="start">
                <ion-img src="./avatar-frodo.jpg"/>
            </ion-avatar>
            <ion-label>
                <h2>Frodo</h2>
                <p>Go back, Sam! I'm going to Mordor alone!</p>
            </ion-label>
        </ion-item>
        <ion-item>
            <ion-avatar slot="start">
                <ion-img src="./avatar-samwise.jpg"/>
            </ion-avatar>
            <ion-label>
                <h2>Samwise</h2>
                <p>What we need is a few good taters.</p>
            </ion-label>
        </ion-item>
    </ion-list>
</ion-content>
`;
}
});

let currentModal = null;
const button = document.querySelector('ion-button');
button.addEventListener('click', createModal);

async function createModal() {
const modal = await modalController.create({
component: 'modal-content'
});

await modal.present();
currentModal = modal;
}

function dismissModal() {
if (currentModal) {
currentModal.dismiss().then(() => { currentModal = null; });
}
}
</script>
</body>
</html>

